@extends('layout.member.master')
@section('content')
    <div class="card mt-4">
        <div class="card-body">
            <div class="header-body mt--5 mt-md--6">
                <div class="row align-items-center">
                    <div class="col">
                        <!-- Nav -->
                        <ul class="nav nav-tabs nav-overflow header-tabs">
                            <li class="nav-item">
                                <a href="{{route('home.lesson.index')}}" class="nav-link active">
                                    课程列表
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="{{route('home.lesson.create')}}" class="nav-link">
                                    课程添加
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="javascript:;" class="nav-link ">
                                    课程编辑
                                </a>
                            </li>

                        </ul>

                    </div>
                </div>
            </div>
        </div>
        <div class="card-block">
            <div class="row listAlias ">
                @foreach($lessons as$lesson)
                <div class="col-12 col-md-6 col-xl-4">
                    <div class="card">
                        <a href="project-overview.html">
                            <img src="{{$lesson->icon}}" alt="..." class="card-img-top" title="" style="">
                        </a>
                        <div class="card-body">
                            <div class="row align-items-center">
                                <div class="col">
                                    <h4 class="card-title mb-2 name">
                                        <a href="project-overview.html">{{$lesson->title}}</a>
                                    </h4>
                                    <p class="card-text small text-muted">
                                        {{$lesson->created_at->diffForHumans()}}
                                    </p>
                                </div>
                                <div class="col-auto">
                                    <div class="dropdown">
                                        <a href="#!" class="dropdown-ellipses dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                            <i class="fe fe-more-vertical"></i>
                                        </a>
                                        <div class="dropdown-menu dropdown-menu-right">
                                            <a href="{{route('home.lesson.show',$lesson)}}" class="dropdown-item">
                                                查看
                                            </a>
                                            <a href="{{route('home.lesson.edit',$lesson)}}" class="dropdown-item">
                                                编辑
                                            </a>
                                            <a href="" class="dropdown-item">
                                                删除
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div> <!-- / .row -->
                            <hr>
                            <div class="row align-items-center">

                                <div class="col-auto">
                                    <!-- Avatar group -->
                                    <div class="avatar-group">
                                        {{$lesson->description}}
                                    </div>
                                </div>
                            </div> <!-- / .row -->
                        </div> <!-- / .card-body -->
                    </div>
                </div>
                    @endforeach
            </div>
        </div>
        <div class="card-footer text-muted">
            暂留
        </div>
    </div>
@endsection